
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.IOException;
public class bufferredreader
{
	public static void main(String[] args)
{	
		try
{
	BufferedReader inputStream = new BufferedReader(new FileReader("demo.txt"));
	String line = inputStream.readLine();	
		System.out.println(line);
			line = inputStream.readLine();
		System.out.println(line); 
		inputStream.close();
		}
catch(FileNotFoundException e)
{
	System.out.println("File demo.txt was not found");
	System.out.println("or could not be opened.");
	}
catch(IOException e)
{
	System.out.println("Error reading from demo.txt.");
	}
}
}